<%@page import="com.neiquan.backstage.pub.bsc.dao.po.Notice"%>
<%@page import="com.neiquan.backstage.notice.NoticeService"%>
<%@page import="com.neiquan.backstage.common.util.Configs"%>
<%@page import="com.neiquan.backstage.pub.bsc.dao.po.Event"%>
<%@page import="java.util.List"%>
<%@page import="com.neiquan.backstage.event.EventService"%>
<%@page import="com.neiquan.backstage.common.CommonService"%>
<%@page import="com.neiquan.backstage.common.util.SpringContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String member = request.getParameter("memberId");
int memberId=Integer.parseInt(member);
ApplicationContext appCtx = SpringContextUtils.getApplicationContext();
NoticeService noticeService = appCtx.getBean(NoticeService.class);
List<Notice> notices = noticeService.queryAll(memberId);
pageContext.setAttribute("notices", notices);
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>公告栏</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="css/base.css" />
	<link rel="stylesheet" href="css/main.css" />
</head>
<body bgcolor="#f0f0f0">
		<section class="mt">
		<%for(int i=0;i<10&&i<notices.size();i++){ %>
			<a href="noticedetail.jsp?id=<%=notices.get(i).getId() %>" class="notice_item common_bg">
				<p class="pd notice_top">
					<span>
						<%=notices.get(i).getName() %>
					</span>
					<time class="fr">
						<%=notices.get(i).getDtCreat() %>
					</time>
				</p>
				<p class="pd tips">
					<%=notices.get(i).getDetail() %>
				</p>
			</a>
			<section class="line"></section>
			<%} %>
		</section>
</body>
<script src="js/responsive.js"></script>
</html>
